// =====================================================================================
// 
//       Filename:  poker.h
// 
//    Description:  
// 
//        Version:  1.0
//        Created:  26.01.2010 20:41:27
//       Revision:  none
//       Compiler:  g++
// 
//         Author:  Dmitriy Serdyuk (), serdyuk.dmitriy@gmail.com
//        Company:  
// 
// =====================================================================================


#ifndef _POKER_H_
#define _POKER_H_ 0

#include<vector>
#include<string>
#include<iostream>
#include<map>

#include "player.h"
        
class Pot{
    private:
        std::map<Player, int> myPlayers;
        int capacity; // -1 = infinity
        int maxBet;

    public:
        
};

class Game{
    public:
        enum ROUNDS {preflop, flop, turn, river};
        const int smallBlind;
        const int bigBlind;
/*         class Player{
            private:
                int myCash;
                Cards myCards;
                std::string myName;
                void addCard(Card);

            public:
                Player(std::string);
                void setName(std::string);
                std::string  getName() const;
            friend class Game;
        };*/
    private:
        Pack myPack;
        std::vector<Player> myPlayers;
        ROUNDS myRound;
        bool isStarted;
        std::vector<Player>::iterator myDiller;




    public:

        
        
        Game();
        void addPlayer(Player);
        void makeRound();
        std::vector<Player>::iterator getNext();
        std::vector<Player>::iterator getAfterNext();




        static Cards getRoyalFlush(Cards);
        static Cards getStraightFlush(Cards);
        static Cards getQuads(Cards);
        static Cards getFullHouse(Cards);
        static Cards getFlush(Cards);
        static Cards getStraight(Cards);
        static Cards getSet(Cards);
        static Cards getTwoPairs(Cards);
        static Cards getOnePair(Cards);
        static Cards Kicker(Cards);
        static bool isRoyalFlush(Cards);
        static bool isStraightFlush(Cards);
        static bool isQuads(Cards);
        static bool isFullHouse(Cards);
        static bool isFlush(Cards);
        static bool isStraight(Cards);
        static bool isSet(Cards);
        static bool isTwoPairs(Cards);
        static bool isOnePair(Cards);


        static int compare(Cards, Cards);
        static int compareSameComb(Cards, Cards);

};

#endif

